home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
rfm100.zip
/
RFM-SUB4.MRG
< prev
next >
Wrap
Text File
|
1990-09-01
|
6KB
|
112 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
*
* This merge modifies the Fast File Search (FFS) lookup
* by adding a 3 character date to each FIDX file entry.
* Every time a user V)iews, D)ownloads, or attempts to
* U)pload a file listed in the FIDX, the current date will
* be inserted in this 3 character field. In that way,
* RBBS will track the date when a file was most recently
* used. Changes are flagged as WM050501.
*
* Warren Muldrow
* The Software Designer
* 8:928/1 or 1:3617/1
* (912)-432-2440
*
* Merge this against 173Asub4.bas to produce rbbssub4.bas
* 173Asub4.bas: Date 8-26-1990 Size 126891 bytes
*
* ------------[ Created 09-01-1990 08:17:11 ]------------
* REPLACING old line(s) by new
58700 ' $SUBTITLE: 'RotorsDir - search thru a list of subdirs for a file'
' $PAGE
'
' NAME -- RotorsDir
'
' INPUTS -- PARAMETER MEANING
' FilName$ FILE NAME TO LOOK FOR
' SDIR.ARA ARRAY OF SUBDIRECTORIES
' MaxSearch MAX # OF SUBDIRECTORIES
' MarkingTime WHETHER TO MARK TIME
'
' OUTPUTS -- FNAME$ ADD SUBDIRECTORY TO THE
' FILE NAME IF FOUND. OTHER-
' WISE DON'T.
' ZOK TRUE IF FILE WAS Found
'
' PURPOSE -- Hunt through a list of subdirectories to determine
' if a file is in any of them. If file is found, open
' the file as file #2, add the drive/path to the file
' name, and sets ZOK to true. If file isn't found, set
' file name to the last subdirectory searched -- which
' should be the upload subdirectory.
'
' If the library menu is selected (ZMenuIndex = 6), then
' only 2 subdirectories are searched. The first being
' the work disk and the second being the selected
' library disk.
'
SUB RotorsDir (FilName$,SDirAra$(1),MaxSearch,MarkingTime,PassToMacro$) STATIC ' KG022204
ZOK = ZFalse
ZDotFlag = ZFalse
IF MarkingTime THEN _
CALL QuickTPut ("Searching for "+FilName$,0)
IF ZMenuIndex = 6 THEN _
GOTO 58705
NumSearch = 1
WasX = 0
WHILE (NOT ZOK) AND NumSearch <= MaxSearch AND _
SDirAra$(NumSearch) <> ""
IF MarkingTime THEN _
CALL MarkTime (WasX)
WasX$ = SDirAra$(NumSearch) + _
FilName$
CALL FindFile (WasX$,ZOK)
NumSearch = NumSearch + 1
WEND
IF ZOK OR NOT ZFastFileSearch THEN _ ' KG022301
GOTO 58710 ' KG022301
* ------[ first line different ]------
CALL OpenRSeq (ZFastFileList$,HighRec,WasX,21) ' WM050501
FIELD #2, 12 AS SearchFile$, _ ' WM050501
4 AS SearchPath$, _ ' WM050501
3 AS SearchDate$, _ ' WM050501
2 AS SearchCrLf$ ' WM050501
IF ZErrCode <> 0 THEN _ ' KG022301
GOTO 58710 ' KG022301
CALL TrimTrail (FilName$,".")
CALL BinSearch (FilName$,1,12,21,HighRec,RecFoundAt,RecFound$) ' WM050501
ZOK = (RecFoundAt > 0)
IF NOT ZOK THEN _ ' KG022301
GOTO 58710 ' KG022301
ZOK = ZFalse
CALL CheckInt (MID$(RecFound$,13,4))
IF ZTestedIntValue < 1 THEN _ ' KG022301
GOTO 58710 ' KG022301
WasX$ = DATE$ ' WM050501
LSET SearchDate$ = CHR$ (VAL (MID$ (WasX$, 9, 2)) - 48) + _ ' WM050501
CHR$ (VAL (MID$ (WasX$, 1, 2)) + 31) + _ ' WM050501
CHR$ (VAL (MID$ (WasX$, 4, 2)) + 31) ' WM050501
PUT 2, RecFoundAt ' WM050501
CALL OpenRSeq (ZFastFileLocator$,HighRec,WasX,66)
IF ZErrCode <> 0 OR ZTestedIntValue > HighRec THEN _ ' KG022301
GOTO 58710 ' KG022301
FIELD 2, 66 AS LocatorRec$
GET 2, ZTestedIntValue
WasX$ = LEFT$(LocatorRec$,63)
CALL Trim (WasX$)
IF LEFT$(WasX$,2) = "M!" THEN _
ZOK = ZFalse : _ ' KG022301
ZGSRAra$(1) = PassToMacro$ : _ ' KG022204
WasX$ = RIGHT$(WasX$,LEN(WasX$)-2) : _ ' KG022204
CALL Trim (WasX$) : _ ' KG022204
ZFileLocation$ = "" : _ ' KG022301
CALL MacroExe (WasX$) : _ ' KG022204
IF ZFileLocation$ = "" THEN _ ' KG022301
ZOK = ZFalse : _ ' KG022204
GOTO 58711 _ ' KG022301
ELSE WasX$ = ZFileLocation$ ' KG022301
WasX$ = WasX$ + FilName$ ' KG022301
CALL FindFile (WasX$,ZOK) ' KG022301
GOTO 58710 ' KG022301